package com.jmp.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
@Builder
public class GoodsInfoResponse {
    @ApiModelProperty("商品ID")
    private Integer goodsId;
    @ApiModelProperty("商品图片,多张逗号分割")
    private String goodsPhotos;
    @ApiModelProperty("商品名称")
    private String goodsName;
    @ApiModelProperty("商品分类ID")
    private Integer goodstypeId;
    @ApiModelProperty("商品分类名称")
    private String goodstypeName;
    @ApiModelProperty("是否设置售价:1线上交易 2其他")
    private Integer ispayment;
    @ApiModelProperty("商品详情是否可编辑显示:0不可 1可以")
    private Integer goodsDetailsEditFlag;
    @ApiModelProperty("商品详情-文案")
    private String goodsDetailsMemo;
    @ApiModelProperty("商品详情-图片")
    private List<String> goodsDetailsImgs;
    @ApiModelProperty(value = "规格", dataType = "GoodsInfoResponse.Spec")
    private List<Spec> goodSpecModelList;

    @ApiModel("GoodsInfoResponse.Spec")
    @Data
    @Builder
    public static class Spec {
        @ApiModelProperty("名称")
        private String specAttribute;
        @ApiModelProperty("数量")
        private Integer specNum;
        @ApiModelProperty("价格")
        private BigDecimal price;
    }
}
